export const navigateBack = () => {
	const pages = getCurrentPages()
	if (pages.length == 1) {
		reLaunchToHome()
	}
	uni.navigateBack()
}

export const navigateToPath = (path) => {
	uni.redirectTo({
		url: path
	})
}

export const redirectToToHomePage = () => {
	uni.redirectTo({
		url: '/pages/tabBar/HomePage'
	})
}

export const reLaunchToHomePage = () => {
	uni.reLaunch({
		url: '/pages/tabBar/HomePage'
	})
}

export const navigateToLoginPage = () => {
	uni.navigateTo({
		url: '/pages/other/LoginPage'
	})
}

export const navigateToSearchPage = () => {
	uni.navigateTo({
		url: '/pages/other/SearchPage'
	})
}